﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetYesterdayAmount_ByOrg.aspx.cs" Inherits="Page_AutoUpdate_GetYesterdayAmount_ByOrg" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta name="format-detection" content="telephone=no" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="apple-touch-fullscreen" content="yes" />
    <meta content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <link href="../../CSS/m.css" rel="stylesheet" />
    <link href="../../CSS/MyTest.css" rel="stylesheet" />
    <script src="../../Scripts/jquery-1.8.0.min.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <title>昨日入院明细列表</title>
    <link href="../../CSS/my-order.1.css" rel="stylesheet" />
    <script src="../../Scripts/WebForms/Common.js"></script>
    <style>
        .table_data_details tbody tr th, td {
            height: auto;
            width: 64px;
            font-size: 12px;
            text-align: center;
            color: grey;
        }
    </style>
</head>
<body>
    <section class="jump_patient_select">
        <table class="table_data_details">
            <colgroup>
                <col width="12%">
                <col width="5%">
                <col width="12%">
                <col width="12%">
                <col width="7%">
                <col width="15%">
            </colgroup>
            <tbody>
            </tbody>
        </table>
    </section>
    <div class="noneDate" style="text-align: center; margin-top: 30%; display: none;">
        <p>昨日还没有入院患者~</p>
    </div>
    <script type="text/javascript">
        $().ready(function () {
            GetList();

        });
        function GetList() {
            $.post("/Handler/AutoUpdateHandler.ashx?action=GetYesterdayAmount_ByOrg", { KEY: '<%=Key%>', SearchTime: '<%=searchTime%>' }, function (data) {
                var html = "";
                var allTr = "";
                var list = eval("(" + data + ")").List;
                if (typeof (list) != "undefined") {
                    var temp = '<tr>'
                                    + '<th>科室</th>'
                                    + '<th>收入</th>'
                                + 'tr';


                    for (var i = 0; i < list.length; i++) {
                        var childTemp = '<tr>'
                                        + '<td>{OrgName}</td>'
                                        + '<td>{Amount}</td>'
                                      + '</tr>';
                        if (i == 0) {
                            allTr += childTemp.replace(/{OrgName}/, "无")
                                                    .replace(/{Amount}/, list[i].TOTAMOUNT);
                        } else {

                            allTr += childTemp.replace(/{OrgName}/, list[i].ORGNAME)
                            .replace(/{Amount}/, list[i].TOTAMOUNT);
                        }

                    }
                    html = temp + allTr;
                    $(".table_data_details tbody").append(html);
                    $(".jump_patient_select").show();
                }
            });
        }
    </script>
</body>
</html>
